package com.xiaozhen.coap;

import com.alibaba.nacos.api.NacosFactory;
import com.alibaba.nacos.api.config.ConfigService;
import com.alibaba.nacos.api.config.listener.Listener;
import com.xiaozhen.coap.server.TestServer;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.ConfigurableApplicationContext;

import java.util.Properties;
import java.util.concurrent.Executor;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/9/14 9:07
 * @description:
 */
@SpringBootApplication(scanBasePackages = {"com.xiaozhen"},
        exclude = {DataSourceAutoConfiguration.class})
@EnableDiscoveryClient
@Slf4j
public class CoapServerApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext context = SpringApplication.run(CoapServerApplication.class, args);
        TestServer testServer = context.getBean(TestServer.class);
        testServer.start();
    }
}
